import { ElMessageBox } from "element-plus";

const confirm = ({ message, okFun, showCancelBtn = true, okText = '确定' }) => {
    ElMessageBox.confirm(message, '提示', {
        "close-on-click-modal": false,
        confirmButtonText: okText,
        cancelButtonText: '取消',
        showCancelButton: showCancelBtn,
        type: 'info'
    }).then(async () => {
        if (okFun) {
            okFun();
        }
    }).catch(() => { });
};
export default confirm;
